#ifndef HNETWORKREPLY_H
#define HNETWORKREPLY_H

#include <QObject>
#include <QNetworkReply>
#include <QTimer>
#include <QString>
#include <QJsonArray>
#include <QtNetwork/QNetworkRequest>
#include <QJsonDocument>
#include <QJsonObject>
#include "com/log.h"
#include "com/global.h"
const int TimeOutInterval=10000;
class HNetworkReply : public QObject
{
    Q_OBJECT
public:
    explicit HNetworkReply(QObject *parent = 0);
     ~HNetworkReply();
    void reply_setNetworkReply(QNetworkReply *reply);
    bool reply_isFinished(){return this->finished;}
signals:
    void reply_rsp(QString url,QJsonDocument rspData);
public slots:
    void reply_Finish_Slot();
    void reply_TimeOut_Slot();
private:
    QTimer outTimer;
    bool finished;
    QString reply_URL;
    QString reply_RawURL;
    QByteArray reply_Pack;
public:
    QNetworkReply *reply=nullptr;
};

#endif // HNETWORKREPLY_H
